package top.kaoshanji.p1ch02a;

import org.springframework.stereotype.Component;

/**
 * 代码清单-p1ch02a-36页b：带有@Component注解的CompactDisc实现类SgtPeppers
 * @author kaoshanji
 * ^_^
 * create time 2025/4/22 15:08
 */
@Component
public class SgtPeppers implements CompactDisc {

    private String title = "Sgt. Pepper's Lonely Hearts Club Band";
    private String artist = "The Beatles";

    @Override
    public void play() {
        // System.out.print("SgtPeppers");
        System.out.print("Playing " + title + " by " + artist);
    }

}
